/********************
Creates Table OB1
********************/

clear
*Update path as needed for your computer
cd "C:\Users\jar68\OneDrive\Ongoing Work\Party Cues and Suspicion Paper\Final Datavserse\Figure1"
log using "figure1_tableob1.log"
use "pooled.dta"
set more off

/****Some Initial Cleaning*****/
label var treat "Treatment Condition"
label var support01 "Policy Support"

gen polissue = . 
	replace polissue = 1 if exp == 1
	replace polissue = 2 if exp == 2 & pol_exp == "Tax:Conservative"
	replace polissue = 3 if exp == 2 & pol_exp == "Tax:Liberal"
	replace polissue = 4 if exp == 3 & pol_exp == "Tax:Conservative"
	replace polissue = 5 if exp == 3 & pol_exp == "Tax:Liberal"
label var polissue "Experiment & Issue"
label def pol1 1 "Experiment 1" 2 "Exp 2: Conservative Change" ///
				3 "Exp 2: Liberal Change" 4 "Exp 3: Conservative Change" ///
				5 "Exp 3: Liberal Change"
label values polissue pol1

encode treat_policy, gen(trp)
label var trp "Policy Treatment"

/******Models******/
eststo clear
eststo: regress support01 i.treat i.polissue
eststo: regress support01 i.treat if exp == 1
eststo: regress support01 i.treat i.trp if exp == 2
eststo: regress support01 i.treat i.trp if exp == 3

/*******Table******/
esttab using "figure1_table.rtf", replace ///
	onecell label nobaselevels b(2) se star(* 0.05 ** 0.01 *** 0.001) ///
	mtitles("Pooled" "Exp. 1" "Exp. 2" "Exp. 3") ///
	title("{\b Table OB1:} Figure 1 Analyses") ///
	addnotes("The baseline category for the cue treatment is the No Cue condition. The base category for experiment/policy in the Pooled model is Experiment 1. The base category for the policy treatment in Exp. 2 and 3 models is the Conservative Change condition")
	

log close


